###
events: ['update']
###

class tree.ui.DrawingArea extends tree.ui.Widget
    
    constructor: () ->
        super
        @htmlelem = document.createElement 'canvas'
        @timer = setInterval callback, 100
    
    update_callback: () =>
        context = @htmlelem.getContext '2d'
        @emit 'update', {widget: _this, context: context}
    
    get_context: () ->
        @htmlelem.getContext '2d'

    stop_drawing: () ->
        clearInterval @timer
